#include<stdio.h>
#include<netinet/in.h>
#include<arpa/inet.h>



int main()
{
  char *ip = "192.168.1.2";
  int addr = inet_addr(ip);
  printf("%d\n",addr);
  struct in_addr a;
  a.s_addr = addr;
  printf("%s\n",inet_ntoa(a));
  printf("%s\n",inet_ntoa(*(struct in_addr*)&addr));

  return 0;
}
